From: Ignacy KuchciƄski Date: Mon, 27 Oct 2025 23:53:41 +0000 (+0100) Subject: timeLimitsManager: Rename function updating state machine X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~109 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2dee27d8dd15825e12df810702ec8ba19e1174ca;p=gnome-shell.git timeLimitsManager: Rename function updating state machine Rename _updateSettings function to _updateStateMachine, since that's what the function actually does, starting or stopping the machine depending on the 'history-enabled' GSetting. Moreover, in the future we'll take into account parental controls settings too, so renaming the function to be more generic will avoid confusion later on. Part-of: --- diff --git a/js/misc/timeLimitsManager.js b/js/misc/timeLimitsManager.js index d4918de5d..1fa2c46ac 100644 --- a/js/misc/timeLimitsManager.js +++ b/js/misc/timeLimitsManager.js @@ -159,7 +159,7 @@ export const TimeLimitsManager = GObject.registerClass({ }; this._screenTimeLimitSettings = this._settingsFactory.new('org.gnome.desktop.screen-time-limits'); this._screenTimeLimitSettings.connectObject( - 'changed', () => this._updateSettings(), + 'changed', () => this._updateStateMachine(), 'changed::daily-limit-seconds', () => this.notify('daily-limit-time'), 'changed::daily-limit-enabled', () => this.notify('daily-limit-enabled'), 'changed::grayscale', () => this.notify('grayscale-enabled'), @@ -178,10 +178,10 @@ export const TimeLimitsManager = GObject.registerClass({ this._ignoreClockOffsetChanges = false; // Start tracking timings - this._updateSettings(); + this._updateStateMachine(); } - _updateSettings() { + _updateStateMachine() { if (!this._screenTimeLimitSettings.get_boolean('history-enabled')) { if (this._state !== TimeLimitsState.DISABLED) { this._stopStateMachine().catch( @@ -190,7 +190,7 @@ export const TimeLimitsManager = GObject.registerClass({ return false; } - // If this is the first time _updateSettings() has been called, start + // If this is the first time _updateStateMachine() has been called, start // the state machine. if (this._state === TimeLimitsState.DISABLED) { this._startStateMachine().catch(